package leihua.crm.workbench.service.impl;

import leihua.crm.workbench.domain.ActivityRemark;
import leihua.crm.workbench.mapper.ActivityRemarkMapper;
import leihua.crm.workbench.service.ActivityRemarkService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author leiHua
 * @Date 2022/10/16 12:58
 */
@Service
public class ActivityRemarkServiceImpl implements ActivityRemarkService {
    @Autowired
    ActivityRemarkMapper activityRemarkMapper;

    @Override
    public List<ActivityRemark> queryActivityRemarkForDetailByActivityId(String id) {
        return  activityRemarkMapper.selectActivityRemarkDetailByActivityId(id);
    }

    @Override
    public int saveCreateActivityRemark(ActivityRemark remark) {
        return activityRemarkMapper.insertSelective(remark);
    }

    @Override
    public int deleteActivityRemarkById(String id) {
        return activityRemarkMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int saveEditActivityRemark(ActivityRemark remark) {
        return activityRemarkMapper.updateByPrimaryKeySelective(remark);
    }
}
